/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package service;

import pojo.Thread;
import java.util.List;
/**
 *
 * @author administrator
 */
public interface IThreadService <T extends Thread> extends IService<T>{
     public List<T> listThread(int categoryID,int offset,int pageSize);
     public List<T> listRecommend(int categoryID,int offset,int pageSize);
     public List<T> listTop(int categoryID,int offset,int pageSize);
     public List<T> listHistory(String uni,int offset,int pageSize);
     public List<T> findThread(String toFind, int offset, int pageSize);
     public int count(int categoryID);
     public int countRecommend(int categoryID);
     public int countHistory(String uni);
     public int count(String toFind);
     public int countName(String toFind);
     public T GetThread(int threadID);
     public T GetThread(String findName);
     public void IncreaseViewTimes(T thread);
     public void IncreaseReplyTimes(T thread);
     public T GetLastThread(int categoryID);
     public void deleteThread(T thread);
     public void updateThread(T thread);

     /**
      * @uthor: Yu
      * @return
      * I use this method to get the newThread's ID
      */
     //public int countTotalNumberOfThread();

     public void createThread(T thread);
}
